<template>
	<view class="content">
		<view>
			<text class="text1 text-line" @tap="goIndexDetail">跳去首页详情(无参数)哈哈哈哈哈哈啊哈时哈哈说的是和哈哈撒谎打哈哈受伤的哈斯哈市和哈哈三打哈返回阿海珐哈哈分阿海司法哈哈分阿海司法哈市发哈三</text>
		</view>
		<view>
			<text class="text2" @tap="goIndexDetailP">跳去首页详情(有参数)</text>
		</view>
		<view>
			<text class="text3" @tap="goIndexDetailS">跳去switchtab通知页</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onShow() {
			// axios请求接口方式
			this.$axios.post(this.$apiBaseConfig.home,{
				name:'张三',
				sex:0
			}).then(function (response) {
				console.log(response)
			}).catch(function (error) {
				console.log(error)
			});
		},
		methods: {
			// 无参数跳转
			goIndexDetail(){
				this.$openPage.push({name:'detail'});
			},
			// 有参数跳转
			goIndexDetailP(){
				this.$openPage.push({name:'detail',query:{name:'hhyang',id:'123'}});
			},
			goIndexDetailS(){
				this.$openPage.pushTab({name:'msg'});
			}
		}
	}
</script>

<style lang="scss">
	.text1{
		@include color(#f00);
		@include line-clamp(2);
	}
</style>
